/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package memsim.instructions;

/**
 *
 * @author Joe
 * This class performs the NOT function on a scalar
 */
public class NOTS {

    /**
     *
     * @param op  The operand to perform not on
     * @return    The complement of op
     */

    public int notScalar(int op){
		long result;
                UnsignedHelper uH = new UnsignedHelper();

                result = ~uH.UnsignedLongFromInt(op);

                result = result & 0xFFFFFFFFL;

		return (int)result;

	}

}
